package com.sky.mapper;

import com.sky.annotation.AutoFile;
import com.sky.entity.SetmealDish;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetMealDishMapper {

    List<Long> getSetmealIdByDishId(List<Long> ids);

    /**
     *  插入setmeal_dish，包括修改时删除后重新插入
     * @param setmealDishList
     * */
    void insertSetMealDish(List<SetmealDish> setmealDishList);

    /**
     *  id查询
     *  @param id
     * */
    @Select("select * from setmeal_dish where setmeal_id = #{id}")
    List<SetmealDish> getById(Long id);


    /**
     *  删除setmeal_dish 根据ids
     * */
    void deleteBySetMealId(List<Long> ids);
}
